// @ts-ignore

 
import { api } from '@/utils/api';

/** 获取设备-保养记录数据 POST /equMaintainRecord/get */
export async function equMaintainRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultEquMaintainRecordEntity>;

export async function equMaintainRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultEquMaintainRecordEntity>>;

export async function equMaintainRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultEquMaintainRecordEntity>;

export async function equMaintainRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultEquMaintainRecordEntity>(`/app/equMaintainRecord/get`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultEquMaintainRecordEntity>(`/app/equMaintainRecord/get`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 处理 POST /equMaintainRecord/handle */
export async function equMaintainRecordHandle(
  body: BIZAPI.EquMaintainRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equMaintainRecordHandle(
  body: BIZAPI.EquMaintainRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equMaintainRecordHandle(
  body: BIZAPI.EquMaintainRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equMaintainRecordHandle(
  body: BIZAPI.EquMaintainRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equMaintainRecord/handle`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equMaintainRecord/handle`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取设备-保养记录分页数据 POST /equMaintainRecord/page */
export async function equMaintainRecordPage(
  body: BIZAPI.EquMaintainRecordQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageEquMaintainRecordEntity>;

export async function equMaintainRecordPage(
  body: BIZAPI.EquMaintainRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageEquMaintainRecordEntity>>;

export async function equMaintainRecordPage(
  body: BIZAPI.EquMaintainRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageEquMaintainRecordEntity>;

export async function equMaintainRecordPage(
  body: BIZAPI.EquMaintainRecordQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageEquMaintainRecordEntity>(`/app/equMaintainRecord/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultIPageEquMaintainRecordEntity>(`/app/equMaintainRecord/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 统计 POST /equMaintainRecord/statistics */
export async function equMaintainRecordStatistics(
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultEquMaintainRecordStatisticsResp>;

export async function equMaintainRecordStatistics(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultEquMaintainRecordStatisticsResp>>;

export async function equMaintainRecordStatistics(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultEquMaintainRecordStatisticsResp>;

export async function equMaintainRecordStatistics(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultEquMaintainRecordStatisticsResp>(`/app/equMaintainRecord/statistics`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultEquMaintainRecordStatisticsResp>(`/app/equMaintainRecord/statistics`, {
    method: 'POST',
    ...(options || {})
  });
}
